package com.scsoft.dataacceptor.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class TimeUtil {
	public static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
	public static SimpleDateFormat sdf2 = new SimpleDateFormat("yyyyMMddHHmmss");
	
	public static Date getMonitorTime(int seconds) {
		Calendar calendar = new GregorianCalendar(1970, 0, 1, 0, 0, 0);
		calendar.add(Calendar.SECOND, seconds);
		return calendar.getTime();
	}
	
	public static String getCurrentTime(){
		return sdf.format(new Date());
	}
}
